<?php
	require("libraries/AddSampleLib.php");
	require 'libraries/UserLibrary.php';
	session_start();
	checkSessionVariable("administrator", "AdministratorHomepage.php", NULL);
?>

<html>
	<head>
	<link rel="stylesheet" type="text/css" href="login.css" />
	<script type = "text/javascript" src="scripts/samplelib.js"></script>

	<!--
		Information about a sample include: 
		sampling date, 
		who submitted the sample, 
		type of sample (water, food, feed, soil, plant, and others), 
		type of sample, 
		analysis required (see other worksheet), 
		date submitted, 
		who received the sample, 
		and remarks. 
	-->
	
	</head>
	<body>
		<form name = "addSample" action = "ProcessAddSample.php" id = "main-form" method = "post">
		<input type = "hidden" name = "counter" id = "counter" value = "1">
		<table id = "1" border="1" align="center" width="100%">
				<tr>
					<td>
						<table>
							<tr>
								<td>Sampling Date:</td>
								<td>
									<input type="text" name="samplingdate[]" id="samplingdate"/>
									<div id = "samdate"></div>
								</td>
								<td>Remarks:</td>
							</tr>
							<tr>
								<td>Sample submitted by / Signature:</td>
								<td>
									<input type="text" name="samplesignature[]" id="samplesignature" onkeypress="return onlyAlphaNum();"/>
									<div id = "sample"></div>
								</td>
								<td rowspan="5"><textarea name = "remarks[]" id="remarks" rows="15" cols="70"></textarea></td>
							</tr>
							<tr>
								<td>Type of Samples:</td>
								<td>
									<select id = "mainTypes" name = "mainTypes[]" onchange = "change()">
										<option value="water">Water</option>
										<option value="food">Food</option>
										<option value="feed">Feed</option>
										<option value="soil">Soil</option>
										<option value="plant">Plant</option>
										<option value="other">Others...</option>
									</select>
									<input type = "text" name = "othersField[]" id = "othersField" disabled="disabled"/>
								</td>
							</tr>
							<tr>
								<td>Analysis Required:</td>
								<td><input type="text" name="analysisreq[]" id="analysisreq"/></td>
							</tr>
							<tr>
								<td>Date Submitted:</td>
								<td>
									<input type="text" name="datesubmit[]" id="datesubmit"/>
									<div id = "datesub"></div>
								</td>
							</tr>
							<tr>
								<td>Sample received by:</td>
								<td>
									<input type="text" name="samplereceive[]" id="samplereceive" onkeypress="return onlyAlphaNum();"/>
									<div id = "samreceived"></div>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			<tr>
				<td>
					<input name="deletesample" type="button" value="DELETE SAMPLE"  onclick="deleteSample()" id="101"/> 
				</td>
			</tr>
			</table>
					<input type="submit" value="DONE" name="imdone" id="imdone"  />
					<input type="button" value="ADD SAMPLES" name="addsample" onclick="newSample()" id="addsample"/> 
				<!--	<input type="button" value="I'M DONE" name="imdone" id="imdone"  onclick=" return checkEmpty()"/> -->
			</form>
	</body>
</html>